<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>成都博物馆内容管理平台</title>
    <link rel="stylesheet" href="../css/ext/bootstrap.min.css">
    <link rel="stylesheet" href="../css/common/base.css">
    <script src="../js/ext/jquery-1.11.3.js"></script>
    <script src="../js/ext/bootstrap.min.js"></script>
    <script src="../js/ext/uploadPreview.js"></script>
    <script src="../js/base.js"></script>
</head>
<body>
<% include ../common/header.jsp %>
<div class="main">
    <% include ../common/menu.jsp %>
    <div class="main-content">
        <div class="wrapper">
            <div class="content-title">
                <!--面包屑-->
                <ol class="breadcrumb">
                    <li>内容管理</li>
                    <li>图片管理</li>
                    <li class="active">编辑</li>
                </ol>
            </div><!--content-title-->
            <form action="" method="post">
                <div class="form-list">
                    <label class="l80"><i class="ic ic-dotred"></i>名称</label>
                    <input id="name" class="i280" type="text" name="" maxlength="20">
                    <em>不超过20个字符，可由中英文数字及中英文符号组成</em>
                </div>
                <div class="form-list">
                    <label class="l80"><i class="ic ic-dotred"></i>图片</label>
                    <div class="img-ext">
                        <div id="imgdiv" class="image-preview">
                            <img style="width: 400px;height: 242px" id="imgShow" src="">
                        </div>
                        <div class="filebtn">
                            <a class="btn btn-upimg" href="javascript:"><span>上传图片</span></a>
                            <em>图片大小为540*320</em>
                            <input type="file" id="up_img" name="file_name">
                        </div>
                    </div>
                </div>
                <div class="form-list textarea">
                    <label class="l80 pl16">备注</label>
                    <textarea id="info" class="t594" name=""></textarea>
                    <em>不超过100个字符</em>
                </div>
                <div style="margin-left: 88px">
                    <input class="btn btn-submit" type="submit" value="提交">
                    <a class="btn btn-cancel" style="margin-left: 40px"><span>取消</span></a>
                </div>
            </form>
        </div><!--wrapper-->
    </div><!--main-content-->
</div>
<script>
    $(function () {
        new uploadPreview({UpBtn: "up_img", DivShow: "imgdiv", ImgShow: "imgShow"});
        $('.btn-upimg').click(function () {
            $('#up_img').trigger('click');
        });
        /*提交时验证*/
        $(document).submit(function () {
            var mark=0;
            if (check_img())mark++;
            if (check_remark())mark++;
            if (mark == 2) {
                $('.btn-submit').val('提交中...').attr('disabled',true);
                setTimeout("$('.btn-submit').val('提交').attr('disabled',false)",300);
                return false;
            } else {
                return false;
            }
        })
    })
</script>
</body>
</html>